package ibms_rcp.util;

import javax.inject.Inject;

import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.e4.ui.workbench.modeling.EPartService;

public class PerspectiveUtils {

	
	public static void switchToPerspective(MApplication application, EModelService modelService, EPartService partService, String id){
		MPerspective element = (MPerspective) modelService.find(id, application);
		// Now switch perspective
		partService.switchPerspective(element);
	}
}
